﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LoginOut.aspx.cs" Inherits="EcSalseManage.LoginOut" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <script type="text/javascript">
        function clearCookie() {
            Deletecookie("WebSite");
            window.location.href = "UserLogin.aspx";
        }
        function Deletecookie(name) {  //删除名称为name的Cookie  
            var exp = new Date();
            exp.setTime(exp.getTime() - 1);
            var cval = GetCookie(name);
            document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString(); //无法删除时添加 path="/"
        }  
        function GetCookie(name) {  //取得名称为name的cookie值  
            var arg = name + "=";
            var alen = arg.length;
            var clen = document.cookie.length;
            var i = 0;
            while (i < clen) {
                var j = i + alen;
                if (document.cookie.substring(i, j) == arg)
                    return getCookieVal(j);
                i = document.cookie.indexOf(" ", i) + 1;
                if (i == 0) break;
            }
            return null;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    </div>
    </form>
</body>
</html>
